layui.use(['form', 'layer'], function () {
    const form = layui.form,
        layer = parent.layer === undefined ? layui.layer : top.layer,
        $ = layui.jquery;

    form.on("submit(addNews)", function (data) {
        $.ajax({
            url: $.cookie("tempUrl") + "hMember/updateById?memberId=" + $.cookie("memberId") + "&bq=" + data.field.label,
            type: "PUT",
            success: function (result) {
                if (result.code === 200) {
                    layer.msg("添加成功，需在下次接诊生效");
                    layer.closeAll("iframe");
                } else {
                    layer.msg("请求失败", {icon: 7, anim: 6});
                }
            }
        });

        return false;
    });
});